<template>
  <KrdPage :showTabBar="false">
    <view class="content-wrapper">
      <text class="title">四川凯睿达环保科技公司</text>
      <image src="/static/slider1.jpg" class="cover-image" mode="aspectFit" />
      <text class="slogan">坚持以"质量满意，技术满意，服务满意"为原则</text>
      <view class="enter-button" @click="enterApp">
        <text class="enter-text">点击进入</text>
      </view>
    </view>
  </KrdPage>
</template>

<script setup lang="ts">
import { onMounted } from "vue";
import KrdPage from "@/components/KrdPage.vue";

// 进入应用的方法
const enterApp = () => {
  // 跳转到首页
  uni.reLaunch({
    url: "/pages/index/index",
  });
};

// 页面加载时自动跳转到首页（可选功能）
onMounted(() => {
  // 如果需要自动跳转，可以设置定时器
  // setTimeout(() => {
  //   enterApp();
  // }, 3000); // 3秒后自动跳转
});
</script>

<style scoped>
.splash-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  padding: 40rpx;
  background-color: #f5f5f5;
  box-sizing: border-box;
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 80vh;
}

.title {
  font-size: 36rpx;
  font-weight: bold;
  color: #333;
  margin-bottom: 60rpx;
  text-align: center;
}

.cover-image {
  width: 80%;
  height: 400rpx;
  border-radius: 20rpx;
  margin-bottom: 60rpx;
  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.1);
}

.slogan {
  font-size: 28rpx;
  color: #666;
  text-align: center;
  line-height: 1.6;
  margin-bottom: 40rpx;
}

.enter-button {
  width: 200rpx;
  height: 60rpx;
  border: 4rpx solid #007aff;
  border-radius: 100rpx;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.enter-text {
  color: #007aff;
  font-size: 28rpx;
}
</style>
